import { createApp } from 'vue'
import App from './App.vue'
import './assets/style/reset.css';
import router from './router'
import axios from 'axios';

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import './router/permission.js';
import * as utils from './utils/index.js';
import bus from './utils/bus.js';
import storage from './utils/storage.js';


const oApp = createApp(App);
oApp.config.globalProperties.$axios = axios.create({
  baseURL: 'http://192.168.163.36:3000',
  timeout: 60000,
  withCredentials: false,
})
oApp.config.globalProperties.$utils = utils;
oApp.config.globalProperties.$bus = bus;
oApp.config.globalProperties.$storage = storage.Storage;


for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  oApp.component(key, component)
}
oApp.use(router);
oApp.use(ElementPlus);
oApp.mount('#app');
